﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Jemgine.Engine.Scripts
{
    [Category("System"), Node]
   public class Filter: Data.ScriptNode
    {
       public Filter()
       {
           AddReference("Entity", null);
           AddInput("In", null);
           AddOutput("Out", null);
       }

       public override void FireTerminal(int InputID, Data.ScriptPayload Payload)
       {
           if (Object.ReferenceEquals(Payload.SenderRef, ReferenceTerminals[0].GetTarget(Payload)))
               OutputTerminals[0].Fire(Payload);
       }

      
    }
}
